package com.jl.model.gongniu.enums;

import java.math.BigDecimal;

public enum  Ante {
    type1("1",new BigDecimal("0.1"),"10%"),
    type2("2",new BigDecimal("0.2"),"20%"),
    type3("3",new BigDecimal("0.3"),"30%");

    private String id;
    private BigDecimal value;
    private String desc;

    Ante(String id, BigDecimal value, String desc) {
        this.id = id;
        this.value = value;
        this.desc = desc;
    }

    public static BigDecimal getValueById(String id){
        Ante[] values = Ante.values();
        for (Ante value : values) {
            if (value.getId().equals(id)){
                return value.getValue();
            }
        }
        return null;
    }

    public String getId() {
        return id;
    }

    public BigDecimal getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }
}
